package com.qf;

import com.qf.dao.PassengerDao;
import com.qf.pojo.Passenger;
import com.qf.utils.MyBatisUtils;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;


public class test {

    @Test
    public void testQueryAll(){
        PassengerDao mapper = MyBatisUtils.getMapper(PassengerDao.class);
        Passenger passenger = new Passenger();
        passenger.setName("臭傻逼");
        passenger.setAge(24);
        passenger.setId(1);
        mapper.update(passenger);
        MyBatisUtils.commit();
    }
}
